﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Face.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<PhotoGallery.Entities.Photo>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    List
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>List</h2>
<%var column=1; %>
<%var id = 0; %>


<% for (var i = 0; i < Model.Count(); i++){ %>
<% if (i < 2) {column = i;} else column = i%3;  %>
<div class="wrapper"></div>

   <%if (column == 0) { %> <div class="left0"> <% } %>
    <%if (column == 1) { %> <div class="left1"> <% } %>
    <%if (column == 2) { %> <div class="left2"> <% } %>
    <h3> <%= ((PhotoGallery.Entities.Photo)Model.ElementAt(i)).Name%> </h3>  
      
<% if (((PhotoGallery.Entities.Photo)Model.ElementAt(i)).Image.SmallImage != null)
   { %>
   <div class="smallimage">
<img src="<%= Url.Action("GetSmallImage", "Photo", new { ((PhotoGallery.Entities.Photo)Model.ElementAt(i)).PhotoId })%>"/>
 
 <%  %>
  
 <% } %>

 

</div>

<div class="paramlist"> 
 <ul>
           
  
  <li>Всего голосов:  <%= ((PhotoGallery.Entities.Photo)Model.ElementAt(i)).RatingCount%></li>
 <li>Всего баллов:  <%= ((PhotoGallery.Entities.Photo)Model.ElementAt(i)).RatingSumm%></li> 
 <li>Загружено: <%= ((PhotoGallery.Entities.Photo)Model.ElementAt(i)).UploadDate%></li>
 </ul> </div>


 
 
 
 </div>

<% } %>


</div>
    </div>
</asp:Content>
